Skip to content

Remember Axis Scaling factors and raise their cap - #273

Merged
WeiqunZhang merged 5 commits into
AMReX-Codes:mainfrom
WeiqunZhang:axis-scale-settings
Sep 25, 2026
Merged

WeiqunZhang merged 5 commits into
AMReX-Codes:mainfrom
WeiqunZhang:axis-scale-settings

Conversation

@WeiqunZhang

Copy link
Copy Markdown
Member

Addresses the aspect-ratio item of #270. The factors are saved when Apply/OK/Reset changes them and restored at startup, and opening a dataset or sequence no longer resets them. Each factor now reaches 10000 (was 100), and the dialog shows factors in shortest form ("1", "1000"; "1e3" works). Spherical plotfiles, where Axis Scaling is unavailable, keep unit factors, and only a change writes the factors, so another window's unrelated save cannot put back its own. The companion's own perpendicular factor stays per companion.
Adds qt_axis_scale_settings_smoke.

Addresses the aspect-ratio item of AMReX-Codes#270. The factors are saved when
Apply/OK/Reset changes them and restored at startup, and opening a
dataset or sequence no longer resets them. Each factor now reaches 10000
(was 100), and the dialog shows factors in shortest form ("1", "1000";
"1e3" works). Spherical plotfiles, where Axis Scaling is unavailable,
keep unit factors, and only a change writes the factors, so another
window's unrelated save cannot put back its own. The companion's own
perpendicular factor stays per companion.
Adds qt_axis_scale_settings_smoke.
A number past the box's range was accepted while typing and then, on
Enter or focus-out, silently replaced by the previous value. fixup()
now clamps it to the nearest bound and shows it (1e19 in Axis Scaling
becomes 10000). An overflow counts as past the maximum.
A complete number too small for a double (1e-400) failed to parse and
was still silently reverted. It now counts as zero and is clamped to the
minimum; unfinished text such as "1e" still keeps the previous value.
fixup() wrote the clamped value in the display format, and the text is
parsed again: %.3g turned DBL_MAX into 1.8e+308, an overflow, and could
round any bound past itself, so Qt still reverted. It now writes full
precision; the committed value is shown in the display format as before.
The C locale used for the full-precision text had RejectGroupSeparator in
place of its default OmitGroupSeparator, so 10000 came out as "10,000",
which a comma-decimal locale then read as 10. QString::number never
groups digits.
@WeiqunZhang
WeiqunZhang merged commit 5443943 into AMReX-Codes:main Sep 25, 2026
12 checks passed
@WeiqunZhang
WeiqunZhang deleted the axis-scale-settings branch September 25, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant